//
//  CollectCollectionViewCell.m
//  Youhuiju
//
//  Created by 余尚飞 on 16/8/23.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import "CollectCollectionViewCell.h"

@interface CollectCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *goodImg;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *sizeLabel;

//适配
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgHig;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *titleLabelLeading;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *titleLabelTrailing;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceLabelHig;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceLabelLeading;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceLabelTop;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *sizeLabelLeading;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *sizeLabelHig;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *buttonTrailing;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *buttonHig;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *buttonWid;



@end

@implementation CollectCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.layer.cornerRadius = 6 * FitH;
    
    self.imgHig.constant = 156 * FitH;
    
    self.titleLabelLeading.constant = 23 * FitW;
    self.titleLabelTrailing.constant = 23 * FitH;
    self.titleLabel.font = [UIFont systemFontOfSize:13 * FitH];
    
    self.priceLabelLeading.constant = 15 * FitW;
    self.priceLabelTop.constant = 10 * FitH;
     self.priceLabelHig.constant = 13 * FitH;
    self.priceLabel.font = [UIFont systemFontOfSize:13 * FitH];
    
    self.sizeLabelLeading.constant = 9 * FitW;
    self.sizeLabelHig.constant = 10 * FitH;
    self.sizeLabel.font = [UIFont systemFontOfSize:10 * FitH];
    
    self.buttonTrailing.constant = 14 * FitW;
    self.buttonHig.constant = 20 * FitH;
    self.buttonWid.constant = 35 * FitW;
    
    
}


- (IBAction)addCartAction:(UIButton *)sender {
    if (self.addCartButtonHandler)
    {
        self.addCartButtonHandler();
    }
}



@end
